package com.demo.serviceImpl;



import com.demo.service.LoginService;
import com.demo.vo.UserVo;

public class LoginServiceImpl implements LoginService{

	public UserVo loginValidate(String username,String password) {
		UserVo user=new UserVo();
		if(isUser(username,password))
		{
			user.setAge(23);
			user.setName(username);
			user.setSex("Ů");
			user.setMsg("success");
			
		}else{
			user.setName(username);
			user.setMsg("fail");
		}
		
		return user;
	}
	public boolean isUser(String username,String password){
		if("cj".equals(username)&&"123456".equals(password)){
		  return true;
		}else{
		  return false;
		}
	}
}
